package com.ktjy.springboot_ch02.web;

import com.ktjy.springboot_ch02.entity.SysUser;
import com.ktjy.springboot_ch02.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private SysUserMapper sysUserMapper;

    @RequestMapping("/list")
    public List<SysUser> list() {
        return sysUserMapper.selectList(null);
    }
}
